﻿using BCCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Common.UserBankCard
{
    /// <summary>
    /// 银行卡创建信息
    /// </summary>
    public class UserBankCardRequestDto
    {


        /// <summary>
        /// 用户ID
        /// </summary>
        [Display(Name = "用户ID")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public long UserId { get; set; }

        /// <summary>
        /// 钱包ID
        /// </summary>
        [Display(Name = "钱包ID")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public long WalletId { get; set; }

        /// <summary>
        /// 银行卡编号
        /// </summary>
        [Display(Name = "银行卡号")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(19, ErrorMessage = "{0} 长度为 {2} 到 {1} 个字符", MinimumLength = 16)]
        [RegularExpression(RegexPatterns.NUMBER, ErrorMessage = "{0} 格式不正确")]
        public string BankCardNo { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>
        [Display(Name = "手机号")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(11, MinimumLength = 11, ErrorMessage = "{0} 长度为 {1} 个数字")]
        [RegularExpression(RegexPatterns.PHONE, ErrorMessage = "{0} 格式不正确")]
        public string Phone { get; set; }

        /// <summary>
        /// 验证码
        /// </summary>
        [Display(Name = "验证码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [StringLength(6, ErrorMessage = "{0} 长度为 {1} 个数字", MinimumLength = 6)]
        [RegularExpression(RegexPatterns.SIX_PASS_CODE, ErrorMessage = "{0} 长度为 6 个数字")]
        public string PassCode { get; set; }

        ///// <summary>
        ///// 银行名称
        ///// </summary>
        //[Display(Name = "银行名称")]
        //[Required(ErrorMessage = "{0} 不能为空")]
        //[MaxLength(30, ErrorMessage = "{0} 最多30个字符")]
        //public string BankName { get; set; }

        ///// <summary>
        ///// 银行名称编码（字典对应SearchKey）
        ///// </summary>
        //[Display(Name = "银行名称编码")]
        //[Required(ErrorMessage = "{0} 不能为空")]
        //[MaxLength(150, ErrorMessage = "{0} 最多150个字符")]
        //public string BankKeyCode { get; set; }


    }
}
